package com.work.work.dto;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "项目报表数据")
public class ProjectReportDTO {
    @ExcelProperty("项目名称")
    private String projectName;

    @ExcelProperty("总任务数")
    private Integer totalTasks;

    @ExcelProperty("已完成任务")
    private Integer completedTasks;

    @ExcelProperty("进行中任务")
    private Integer inProgressTasks;

    @ExcelProperty("未开始任务")
    private Integer notStartedTasks;

    @ExcelProperty("逾期任务")
    private Integer overdueTasks;

    @ExcelProperty("项目进度")
    private String progress;

    @ExcelIgnore
    private List<TaskReportDTO> tasks;

    @Data
    public static class TaskReportDTO {
        @ExcelProperty("所属项目")
        private String projectName;

        @ExcelProperty("任务名称")
        private String taskName;

        @ExcelProperty("优先级")
        private Integer priority;

        @ExcelProperty("负责人")
        private String assignee;

        @ExcelProperty("开始时间")
        private String startTime;

        @ExcelProperty("结束时间")
        private String endTime;

        @ExcelProperty("任务状态")
        private String status;
    }
}